Merged
Conversation
… update documentation
There was a problem hiding this comment.
Pull Request Overview
This PR refactors process execution by unifying command execution under a single executeCommand function, and updates various utility and tool modules to call this function consistently.
- Refactored execution functions in xcodemake, build-utils, and other tools to use a unified executeCommand
- Removed deprecated executeXcodeCommand and related types in favor of executeCommand
- Updated workflow documentation to reflect naming changes
Reviewed Changes
Copilot reviewed 15 out of 15 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/utils/xcodemake.ts | Replaced custom command execution with executeCommand and simplified argument escaping |
| src/utils/xcode.ts | Removed redundant executeXcodeCommand function |
| src/utils/command.ts | Updated executeCommand to support array commands and shell option |
| src/utils/build-utils.ts | Renamed function to executeXcodeBuildCommand and shifted to executeCommand |
| src/types/common.ts | Removed XcodeCommandResponse type |
| src/tools/*.ts | Updated various tools (simulator, idb, clean, build, etc.) to use executeCommand |
| .windsurf/workflows/build-app.md | Updated descriptions for clarity |
Comments suppressed due to low confidence (2)
src/utils/xcodemake.ts:208
- Avoid using process.chdir in a utility function as it changes the global working directory. Instead, update executeCommand to accept a cwd option and pass projectDir to spawn so that the working directory is set locally for that command execution.
process.chdir(projectDir);
src/utils/command.ts:65
- [nitpick] Consider enhancing error reporting in the 'error' event handler to wrap the raw error with additional context (e.g., including the executed command) for improved debugging in production.
const process = spawn(executable, args, { stdio: ['ignore', 'pipe', 'pipe'] });
peymankh4
approved these changes
May 15, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refactor process execution functions to use a single unified
executeCommandfunction, this can be used directly for basic shell commands. Forxcodebuild ... build|testetc commandsexecuteXcodeBuildCommandshould be preferred which calls the lower levelexecuteCommandto spaw thenxcodebuildprocess.